<template>
    <div>
        
    </div>
</template>

<script>
import {of} from 'rxjs'
import {map, tap} from 'rxjs/operators'

export default {
    
    mounted(){
        const source$ = of('jack')
        const tapp$ = source$.pipe(
            tap(console.log), ///调试
            map(v=>String.prototype.toUpperCase.call(v)),
            tap(console.log), ///调试
            tap(async v=> {
                await Promise.resolve()
                alert(v)
            })
        )
        tapp$.subscribe(v=>console.log('===',v,'==='));
    }
}
</script>